﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="information_list.aspx.cs" Inherits="Web.Admin.information_list" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
     <pan:SmartGridView ID="gdvInfoList" runat="server" Width="657px"  
            AllowPaging="True" AllowSorting="True"  AutoGenerateColumns="False" DataSourceID="sdsInformationList"
        PageSize="15"  BorderWidth="1px"   DataKeyNames="InfoID" BackColor="White" 
            BorderColor="#999999" BorderStyle="None" CellPadding="3" GridLines="Vertical" >
         <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
         <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
        <Columns>
                
                <asp:HyperLinkField DataNavigateUrlFields="InfoID" 
                    DataNavigateUrlFormatString="information_detail.aspx?id={0}" 
                    DataTextField="Title" HeaderText="标题" />
                <asp:BoundField DataField="AreaName" HeaderText="城市" 
                    SortExpression="AreaName" />
   
                <asp:BoundField DataField="CorpTypeName" HeaderText="类别" 
                    SortExpression="CorpTypeName" />
                
                <asp:BoundField DataField="InfoType" HeaderText="子类别" 
                    SortExpression="InfoType" />
                <asp:BoundField DataField="source" HeaderText="来源" 
                    SortExpression="source" />
                <asp:BoundField DataField="ImageUrl" HeaderText="图片" 
                    SortExpression="ImageUrl" Visible="false" />
               
                <asp:BoundField DataField="InfoDate" HeaderText="日期" 
                    SortExpression="InfoDate" DataFormatString="{0:yyyy年MM月dd日}" />
   
                <asp:BoundField DataField="Hits" HeaderText="点击数" 
                    SortExpression="Hits" />
        </Columns>
         <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
        <EmptyDataTemplate>
        <div style='text-align:left;margin-left:20px;line-height:20px;margin-bottom:10px;'>
		   <p style='color:#FF4E00;font-size:14px;font-weight:bold;'> 抱歉！没有搜索到相关信息 ！<br /><br /></p>

			可能的原因有：<br />
			1、条件不正确<br />
			2、没有满足搜索条件的信息。<br /></div>
        
        </EmptyDataTemplate>
         <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
        <CustomPagerSettings PagingMode="Webabcd" TextFormat="每页{0}条/共{1}条  第{2}页/共{3}页   " />
        <PagerSettings Position="Bottom" PageButtonCount="13" FirstPageText="首页" PreviousPageText="上一页"
            NextPageText="下一页" LastPageText="末页" />
         <AlternatingRowStyle BackColor="#DCDCDC" />
         <RowStyle BackColor="#EEEEEE" ForeColor="Black" />
    </pan:SmartGridView>	  

        <asp:SqlDataSource ID="sdsInformationList" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            SelectCommand="SELECT [InfoID], [InfoType], [source], [ImageUrl],[Title], 
Informations.[CorpTypeID],c.TypeName as CorpTypeName,
 a.[AreaID], a.AreaName, [InfoDate], [Hits]
FROM [Informations] left join Sys_Area a on a.AreaID = Informations.AreaID
left join CorpType c on informations.CorpTypeID = c.TypeID order by informations.InfoDate desc"></asp:SqlDataSource>
    
    </div>
    </form>
</body>
</html>
